-- background: 2802 from stack: in -- bmap block id: 3079 -- flags: 4000 -- background id: 0 -- name: Plot.back ----- HyperTalk script ----- -- hp2pict XCMD calls -- hp2pict "open",name ; returns window pointer -- open blank window -- hp2pict "drawf",window pointer, filename w/ HPGL -- draw hp file contents to window -- hp2pict "drawc",window pointer, CONTAINTER w/ HPGL -- draw hp container contents to window -- hp2pict "fetch",window pointer, CONTAINTER w/ HPGL -- draw hp while fetching from comm link w/ "recvTo(...)" msg -- hp2pict "file",window pointer,filename for PICT -- save window pict as file -- hp2pict "clip",window pointer -- put window pict into clipbd -- hp2pict "print",window pointer -- print window pict -- hp2pict "close",window pointer on closeBackground closeplot end closeBackground on newPlot global plotWindow, plotName set cursor to watch put the rect of bg button "plotsize" into plotsize hp2pict "open", plotName, plotsize put the result into plotWindow show bkgnd button "Close plot" show bkgnd button "Clip plot" show bkgnd button "File" show bkgnd button "Print" --update end newPlot on closeplot global plotWindow if (plotWindow is not empty) and (plotWindow is not 0) then hp2pict "close",plotWindow put empty into plotWindow end if hide bkgnd button "Close plot" hide bkgnd button "Clip plot" hide bkgnd button "File" hide bkgnd button "Print" end closeplot on clipPlot global plotWindow, plotName hp2pict "clip",plotWindow put rect of bg button "plotsize" into plotsize DoMenu "Paste Picture" -- auto selects paint tool put item 1 to 2 of plotsize into pt drag from 0,0 to pt choose browse tool put plotName into field "title" end clipPlot on printPlot global plotWindow hp2pict "print", plotWindow end printPlot on filePlot global plotWindow, plotName, plotPath put plotName into filename get offset(".",filename) if it > 0 then put char 1 to it-1 of filename into filename put plotPath & filename & ".Pict" into filename hp2pict "file", plotWindow, filename end filePlot on doHPfile global plotWindow, plotName, plotPath closePlot put filename("TEXT") into hpfile if hpfile = empty then exit doHPfile put empty into f repeat with i = length(hpfile) down to 1 if char i of hpfile = ":" then put char 1 to i of hpfile into plotPath exit repeat end if put char i of hpfile before f end repeat put f into plotName newPlot hp2pict "drawf", plotWindow, hpfile -- the result contains full hp script from file --get the result --writetofile it,true,hpfile & ".2",false,"MPS " --XCMD WriteToFile container,,<"name">,, end doHPfile -- end plot.back -- part 1 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=451 top=21 right=41 bottom=471 -- title width / last selected line: 0 -- icon id / first selected line: 1013 / 1013 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Next ----- HyperTalk script ----- on mouseUp visual effect wipe left go to next card end mouseUp -- part 2 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=449 top=4 right=23 bottom=470 -- title width / last selected line: 0 -- icon id / first selected line: 1014 / 1014 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Prev ----- HyperTalk script ----- on mouseUp visual effect wipe right go to previous card end mouseUp -- part 3 (button) -- low flags: 80 -- high flags: A004 -- rect: left=461 top=171 right=217 bottom=504 -- title width / last selected line: 0 -- icon id / first selected line: 5059 / 5059 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: File ----- HyperTalk script ----- on mouseUp filePlot end mouseUp -- part 17 (button) -- low flags: 00 -- high flags: A004 -- rect: left=445 top=55 right=79 bottom=510 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Plot file ----- HyperTalk script ----- on mouseUp doHPfile end mouseUp -- part 4 (button) -- low flags: 80 -- high flags: A004 -- rect: left=460 top=117 right=163 bottom=503 -- title width / last selected line: 0 -- icon id / first selected line: 1007 / 1007 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Print ----- HyperTalk script ----- on mouseUp printPlot end mouseUp -- part 6 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=149 top=10 right=35 bottom=416 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 14 -- style flags: 0 -- line height: 18 -- part name: title -- part 9 (button) -- low flags: 80 -- high flags: A004 -- rect: left=441 top=55 right=81 bottom=512 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Close Plot ----- HyperTalk script ----- on mouseUp closeplot end mouseUp -- part 11 (button) -- low flags: 80 -- high flags: A004 -- rect: left=449 top=86 right=109 bottom=510 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Clip Plot ----- HyperTalk script ----- on mouseUp clipPlot end mouseUp -- part 18 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=473 top=4 right=22 bottom=494 -- title width / last selected line: 0 -- icon id / first selected line: 29019 / 29019 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: to TOC ----- HyperTalk script ----- on mouseUp visual effect wipe down go to card "TOC" end mouseUp -- part 20 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=0 top=48 right=342 bottom=437 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: plotsize